﻿using System.Collections.Generic;
using theeg.GraphWpf.Models;

namespace theeg.GraphWpf.Arrangement
{
    internal class Tree
    {
        internal void Arrange(double gridSize1, double gridSize2, List<Node> nodesToArrange)
        {
            int x = 1;
            int depth = 1;
            Node root;

            do
            {
                root = ArrangementMediator.FindRoot(nodesToArrange);
                if (root != null)
                {
                    x = ArrangementMediator.Traverse(root, x, 1, gridSize1, gridSize2, ref depth);
                }
            } while (root != null);
        }
    }
}
